2004-11-09 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkaction.[hc]:
+ * gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
+ instead of const.
+
+ * gtk/gtk.symbols:
+ * gtk/gtkaction.h:
+ * gtk/gtkaction.c (gtk_action_get_accel_path): Add
+ a function to obtain the accel path of an action. (#148106,
+ Michael Natterer)
+
* tests/testiconview.c: Fix double-click activation.
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
2004-11-09 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkaction.[hc]:
+ * gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
+ instead of const.
+
+ * gtk/gtk.symbols:
+ * gtk/gtkaction.h:
+ * gtk/gtkaction.c (gtk_action_get_accel_path): Add
+ a function to obtain the accel path of an action. (#148106,
+ Michael Natterer)
+
* tests/testiconview.c: Fix double-click activation.
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
2004-11-09 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkaction.[hc]:
+ * gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
+ instead of const.
+
+ * gtk/gtk.symbols:
+ * gtk/gtkaction.h:
+ * gtk/gtkaction.c (gtk_action_get_accel_path): Add
+ a function to obtain the accel path of an action. (#148106,
+ Michael Natterer)
+
* tests/testiconview.c: Fix double-click activation.
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
2004-11-09 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkaction.[hc]:
+ * gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
+ instead of const.
+
+ * gtk/gtk.symbols:
+ * gtk/gtkaction.h:
+ * gtk/gtkaction.c (gtk_action_get_accel_path): Add
+ a function to obtain the accel path of an action. (#148106,
+ Michael Natterer)
+
* tests/testiconview.c: Fix double-click activation.
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
gtk_action_create_tool_item
gtk_action_disconnect_accelerator
gtk_action_disconnect_proxy
+gtk_action_get_accel_path
gtk_action_get_name
gtk_action_get_proxies
gtk_action_get_sensitive
*
* Since: 2.4
**/
-const gchar *
+G_CONST_RETURN gchar *
gtk_action_get_name (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
action->private_data->accel_quark = g_quark_from_string (accel_path);
}
+/**
+ * gtk_action_get_accel_path:
+ * @action: the action object
+ *
+ * Returns the accel path for this action.
+ *
+ * Since: 2.6
+ *
+ * Returns: the accel path for this action, or %NULL
+ * if none is set. The returned string is owned by GTK+
+ * and must not be freed or modified.
+ */
+G_CONST_RETURN gchar *
+gtk_action_get_accel_path (GtkAction *action)
+{
+ g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
+
+ if (action->private_data->accel_quark)
+ return g_quark_to_string (action->private_data->accel_quark);
+ else
+ return NULL;
+}
+
+
/**
* gtk_action_set_accel_group:
* @action: the action object
const gchar *label,
const gchar *tooltip,
const gchar *stock_id);
-const gchar* gtk_action_get_name (GtkAction *action);
+G_CONST_RETURN gchar* gtk_action_get_name (GtkAction *action);
gboolean gtk_action_is_sensitive (GtkAction *action);
gboolean gtk_action_get_sensitive (GtkAction *action);
void gtk_action_set_sensitive (GtkAction *action,
GSList* gtk_action_get_proxies (GtkAction *action);
void gtk_action_connect_accelerator (GtkAction *action);
void gtk_action_disconnect_accelerator (GtkAction *action);
+G_CONST_RETURN gchar *gtk_action_get_accel_path (GtkAction *action);
/* protected ... for use by child actions */
void gtk_action_block_activate_from (GtkAction *action,
*
* Since: 2.4
*/
-const gchar *
+G_CONST_RETURN gchar *
gtk_action_group_get_name (GtkActionGroup *action_group)
{
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
GType gtk_action_group_get_type (void);
GtkActionGroup *gtk_action_group_new (const gchar *name);
-const gchar *gtk_action_group_get_name (GtkActionGroup *action_group);
+G_CONST_RETURN gchar *gtk_action_group_get_name (GtkActionGroup *action_group);
gboolean gtk_action_group_get_sensitive (GtkActionGroup *action_group);
void gtk_action_group_set_sensitive (GtkActionGroup *action_group,
gboolean sensitive);